package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.reggie.domain.Category;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface CategoryMapper extends BaseMapper<Category> {
    //查询所有菜品分类
    List<Category> findAll();

    //添加菜品
    void save(Category category);


    //修改菜品信息
    void update(Category category);

    //根据id查询分类下的菜品数量
    Integer countDishByCategoryId(long id);
    //根据id查询套餐下的菜品数量
    Integer countSetmealByCategoryId(long id);
    //根据id删除分类
    void delete(long id);
}
